package com.oak.designmode._07_proxyParttern.staticProxy;

/**
 * 代理类
 *
 * @Description
 * @Author guoxy
 * @Date 2019/11/30
 * @Version 1.0
 */
public class BuyCarProxy implements BuyCar {

    private  BuyCar buyCar;

    public BuyCarProxy(final BuyCar buyCar) {
        this.buyCar = buyCar;
    }

    @Override
    public void buyCar() {
        System.out.println("考驾照，工作挣钱...");
        buyCar.buyCar();
        System.out.println("买车后开出去兜风...");
    }
}
